import java.rmi.*;
import java.rmi.server.*;

class OServer
{
public static void main(String [] args)
	 {
		 if(args.length!=1||args.length==0)
		 {
	 System.out.println("Usage: java OServer [hostname]:[port]");
		 }
		 else{
	try{
	OImpl oimpl = new OImpl();
	Naming.rebind("//"+args[0]+"/OServer",oimpl);
	}catch(Exception e){System.out.println(e);}
		 }
	 }
}
